package com.lk.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.lk.service.UserService;
import mvc.annotation.Controller;
import mvc.annotation.Quatifier;
import mvc.annotation.RequestMapping;

@Controller(value="/UserController")
public class UserController {
	
	@Quatifier("UserServiceImpl")
	UserService userService;
	
	@RequestMapping(value="/login")
    public String login(HttpServletRequest request , HttpServletResponse response,String username,String  password){

		if(userService.login(username,password)==0){
        	return "/index.jsp";
        }
		return "/login.jsp";
    }
}
